{include file="header.html"}
<div id="page_main" class="main-right">
  <div id="rightTop">
    <p>{$lang.template_setting}</p>
    <ul class="subnav">
      <li><a class="btn1" href="{url route='template/index'}">{$lang.template_list}</a></li>
      <!-- {if !$channel} -->
      <li><span>{$lang.channel_add}</span></li>
      <!--{else}-->
      <li><a class="btn1" href="{url route='channel/add'}">{$lang.channel_add}</a></li>
      <li><span>{$lang.channel_edit}</span></li>
      <!-- {/if} -->
    </ul>
  </div>
  <div class="info">
    <form method="post">
      <table class="infoTable">
        <tr>
          <th class="paddingT15"> {$lang.title}:</th>
          <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" type="text" name="title" value="{$channel.title|escape}" />
            <label class="field_notice">{$lang.title_note}</label></td>
        </tr>
        <tr>
          <th class="paddingT15"> <label for="parent_id">{$lang.cate_id}:</label>
          </th>
          <td class="paddingT15 wordSpacing5"><select class="querySelect" name="cate_id">
              <option>{$lang.select_pls}</option>
              
			{html_options options=$gcategories selected=$channel.cate_id}		
          
            </select>
            <label class="field_notice">{$lang.cate_id_note}</label></td>
        </tr>
        <tr>
          <th class="paddingT15">{$lang.channel_style}:</th>
          <td class="paddingT15 wordSpacing5 channel_style"><input type="radio" id="style1" name="style" value="1" {if !$channel || $channel.style eq '1' || $app->
            controller->action->id eq 'add'}checked="checked"{/if} />
            <label for="style1">{$lang.style}1</label>
            [<a href="{res file='screenshot_channel_style1.jpg' baseUrl=$homeUrl folder='mall'}" target="_blank">{$lang.preview}</a>]
            <input type="radio" id="style2" name="style" value="2" {if $channel.style eq '2'}checked="checked"{/if} />
            <label for="style1">{$lang.style}2</label>
            [<a href="{res file='screenshot_channel_style2.jpg' baseUrl=$homeUrl folder='mall'}" target="_blank">{$lang.preview}</a>] </td>
        </tr>
        <tr>
          <th class="paddingT15">{$lang.status}:</th>
          <td class="paddingT15 wordSpacing5"><input type="radio" id="status1" name="status" value="1" {if !$channel || $channel.status eq '1' || $app->
            controller->action->id eq 'add'}checked="checked"{/if} />
            <label for="status1">{$lang.enable}</label>
            <input type="radio" id="status0" name="status" value="0" {if $channel.status eq '0'}checked="checked"{/if} />
            <label for="status0">{$lang.disable}</label>
            <label class="field_notice">{$lang.if_enabled}</label></td>
        </tr>
        <tr>
          <th></th>
          <td class="ptb20"><input class="formbtn J_AjaxSubmit" type="submit" value="{$lang.submit}" /></td>
        </tr>
      </table>
    </form>
  </div>
</div>
<script type="text/javascript">
$(function(){
	var style = '{$channel.style}';
	$('input[name="style"]').click(function() {
    if(!style) return;
    
		if(style != $(this).val() && confirm(lang.change_style_notice)){
			$(this).prop('checked',true);
		} else {
			$('#style{$channel.style}').prop('checked',true);
		}
	});
});
</script> 
{include file="footer.html"} 